<template>
  <button :class="['dw-button', type, { 'dw-loading': loading, 'dw-waiting': waiting, 'dw-disabled': disabled }]" :disabled="disabled" @click="$emit('click')">
    <slot></slot>
  </button>
</template>

<script>
export default {
  name: "dwButton",
  props: {
    // primary success info warning danger
    type: {
      type: String,
      default: "default",
    },
    loading: {
      type: Boolean,
      default: false,
    },
    waiting: {
      type: Boolean,
      default: false,
    },
    disabled: {
      type: Boolean,
      default: false,
    },
  },
  methods: {},
};
</script>

<style lang="less" scoped>
@import "./assets/index.less";
@import "./assets/status.less";
</style>
